Skip to content

Modules and Functions

The aolearn library is a collection of machine learning algorithms implemented in a modular fashion. Each module focuses on a specific type of machine learning technique, and each function within a module serves a distinct purpose—training models, making predictions, and handling classification tasks.

# Modules Overview

  1. Linear Regression (aolearn.linear_regression)

    • Implements simple linear regression using gradient descent for parameter optimization.
  2. Logistic Regression (aolearn.logistic)

    • Handles binary classification problems using logistic regression and the sigmoid function.
  3. Lasso Regression (aolearn.lasso)

    • Introduces L1 regularization to reduce overfitting and enforce sparsity in the model.
  4. Ridge Regression (aolearn.ridge)

    • Implements L2 regularization to reduce overfitting while keeping all features.
  5. Multiclass Logistic Regression (aolearn.multiclass_logistic)

    • Extends logistic regression to handle multiple classes using the softmax function.
  6. Naive Bayes (aolearn.naive_bayes)

    • A probabilistic classification method based on Bayes' theorem, assuming feature independence.
  7. k-Nearest Neighbors (aolearn.knn)

    • A non-parametric algorithm that classifies data points based on proximity to labeled examples.
  8. Clustering (aolearn.clustering)

    • Implements k-Means clustering for unsupervised learning and pattern discovery.

Functions Overview

Each module is stored in a separate file within the aolearn package. These files contain:

  • Function Definitions: Implementation of training and prediction functions.
  • Parameter Descriptions: Explanation of inputs and outputs for each function.
  • Mathematical Concepts: Descriptions of the algorithms and optimization techniques used.